package cn.itcast.order.service;

import cn.itcast.entity.Order;
import cn.itcast.order.dao.OrderDao;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class OrderServiceImpl implements OrderService {

	@Autowired
	private OrderDao orderDao;

	@Override
	public Order findById(Long id) {
		return orderDao.findById(id).get();
	}

	@Override
	public List findAll() {
		return orderDao.findAll();
	}
}
